package com.ln.dm1103.demo02;

import java.util.function.Supplier;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/3 16:52
 */
public class TestSupplier {
    public static void main(String[] args) {
        Supplier<String> supplier=()->{
            return "你好世界";
        };
        fun(supplier);
    }
    public static void fun(Supplier<String> supplier){
        String s = supplier.get();
        System.out.println("s = " + s);
    }
}
